package com.drakulo.hi.gfx.splash;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.UnicodeFont;
import org.newdawn.slick.state.StateBasedGame;

import com.dk.hi.core.I18n;
import com.drakulo.hi.gfx.FontFactory;

public class GameLoading extends SplashScreen {
	private int count;

	public GameLoading() {
		this.count = 0;
	}

	@Override
	public void render(Graphics g) throws SlickException {
		UnicodeFont font = FontFactory.getArial_25_white();
		font.drawString(200, 400, I18n.get("splash.loading"));
	}

	@Override
	public void update(Input input, StateBasedGame game) throws SlickException {
		super.update(input, game);
		if (this.count == 1000) {
			finish();
		} else {
			this.count++;
		}
	}
}
